﻿CREATE TABLE [v1].[JournalLine] (
    [JournalId]              INT             NOT NULL,
    [JournalLineNumber]      INT             NOT NULL,
    [CostCentreId]           INT             DEFAULT ((-1)) NOT NULL,
    [UnitId]                 INT             DEFAULT ((-1)) NOT NULL,
    [AccountId]              INT             DEFAULT ((-1)) NOT NULL,
    [ClientId]               INT             DEFAULT ((-1)) NOT NULL,
    [SecurityId]             INT             DEFAULT ((-1)) NOT NULL,
    [ContractId]             INT             DEFAULT ((-1)) NOT NULL,
    [JournalLineAmountCCY]   NUMERIC (18, 2) DEFAULT ((0)) NOT NULL,
    [JournalLineAmountGBP]   NUMERIC (18, 2) DEFAULT ((0)) NOT NULL,
    [JournalLineDescription] NVARCHAR (200)  NULL,
    PRIMARY KEY CLUSTERED ([JournalId] DESC, [JournalLineNumber] ASC) WITH (FILLFACTOR = 90, ALLOW_PAGE_LOCKS = ON, ALLOW_ROW_LOCKS = ON, PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF, STATISTICS_NORECOMPUTE = OFF)
);

